home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
DOSIMP12.ARJ
/
SIMPLY6.HYP
< prev
next >
Wrap
Text File
|
1992-01-16
|
111KB
|
1,849 lines
The |tAbort, Retry, Fail, Ignore|t Error Message
Here's something you're going to see about a zillion times. Practically
every time anything goes wrong with a disk read or write, DOS is going to
tell you a short explanation of the problem and then show you this mess-
age as well, so you can decide what you want to do about that problem.
Well if it's a problem you can do something about, like putting the right
disk back into the drive, or removing the write-protect from the disk, or
closing the door on the drive, then do it and press R for Retry, and ev-
erything will be fine. If the same message comes back again, try R again
a couple more times and if you still get the same message, then choose A
for Abort, but be aware that in some cases what that will do is cancel
the entire program that asked for the disk access. So you might lose
some data. The only time I can think of that you'll need the Fail op-
tion, is if you have $P$G as your prompt, and you forget and take the
disk out of the drive before you switch back to the hard drive. Don't
ever use the Ignore option unless you know exactly what you're doing.
What that one will do, is allow the program to continue, without making
the read or write on the disk. So don't ever choose Ignore.
<page down> for Booting and Rebooting
|tBoot|ting and |tReboot|ting
To "boot" a computer just means to turn on the power. This term comes
from the expression "pulling oneself up by the bootstraps". You see,
when a computer is not receiving any power, it obviously doesn't have
any software loaded into memory, so the computer is quite stupid at that
time. When you turn on the power, the computer loads the operating sys-
tem (DOS) into memory, and suddenly it has become a useful piece of mach-
inery. So that's sort of analogous to the way a bum in the gutter might
"pull himself up by the bootstraps" and make something of himself.
To "reboot" a computer means to remove everything from the computer's
memory and have it reload the operating system from the disk, just as if
the power had been turned off and back on. There are two different types
of |nreboot|n, and several ways to accomplish each. (See also Boo|1t Disk.)
First, a "cold boot" or "hard reboot" means to actually remove and re-
apply power. This is necessary sometimes when the computer has "crashed"
so hard that a warm |nboot|n won't even work. And that's the only time you
<page down> for more Boot and Reboot
want to perform a cold |nboot|n, because a warm |nboot|n is a little bit easier
on the computer's components. That's why a warm |nboot|n is also known as a
"soft reboot".
A "warm boot" does not actually remove power from the computer, it just
clears out the RAM completely, causing the computer to reload DOS from
the disk. It fulfills the same function that a cold |nboot|n does, without
the shock to the system that is caused whenever power is reapplied to the
components.
So how do you accomplish a reboot? The easiest way is to hold the <Ctrl>
and <Alt> keys down, and hit the <Del> key. The Ctrl-Alt-Del method per-
forms a warm or soft |nreboot|n. There are also some public domain software
programs that can perform a warm |nboot|n from within a batch file.
Other public domain programs can do a cold |nboot|n. Another way is to just
turn the power switch off and back on. But please, wait at least thirty
seconds between turning it off and turning it back on, to allow the hard
drive and the fan to stop spinning. It's best if you turn it off, then
<page down> for more Boot and Reboot
go get a cup of coffee or something, then come back and turn it back on.
Remember that the hard drive is spinning at some amazing speed like 3600
revolutions per minute, the whole time it's on. Slowing it down (turn-
ing it off) and speeding it up (turning it back on) so quickly like that
is not good for it.
If you have a reset button on the front panel of your computer, it may
perform a warm or cold |nreboot|n, depending on the brand and model of your
machine. The easiest way to tell, is to see if your computer performs
the |TPOST|T when this button is pressed, or not. |nPower|n-On Self Test is what
that stands for, and it is performed by a program that's stored in a ROM
chip on your motherboard. This test is only performed when the power is
turned on, so obviously if your reset button causes the computer to do
the |nPOST|n then it's doing a cold |nboot|n. If your screen shows a little num-
ber up in the top left corner that counts up in increments of 64, then it
is testing your RAM and that's part of the |nPOST|n. If your reset button
does not cause the RAM test to occur, then it's doing a warm |nboot|n.
The problem with rebooting a computer is that even if you didn't do it
<page down> for more Boot and Reboot
on purpose, it stills clears out every byte of everything in memory. So
save your work to disk, often! That way, if your computer locks up and
you're forced to |nreboot|n, then you only lose a little bit of work, what-
ever you've done since the last time you saved to disk.
See the section about the SHELL command for a quick description of what
the computer does while it's booting.
<page down> for What Is a |nBoot|n Disk?
What Is a |tBoo|1t Disk|t?
A boot disk is a disk that has been made bootable. This is the only kind
of disk that a computer will boot from. What makes a disk bootable? It
has to have a |nboot|n record on it, as well as having the two system files
(|sIO.SYS|s and MSDOS.SYS for MS-DOS or IBMBIO.COM and IBMDOS.COM for PC-DOS)
in the right area of the disk, and it also has to have COMMAND.COM on it.
How do you make a bootable disk? (That's also called a "system disk".)
It's really easy. You just use the FORMAT A: /S command. That command
will put all of those necessary ingredients onto the disk. Don't forget
that the FORMAT command will first remove all data from the disk.
Another way is to use the command SYS A: and then COPY the COMMAND.COM
file to the disk. The |TSY|1S|T command will put the system files from the
current drive, and the |nboot|n record, onto the specified disk, but not the
COMMAND.COM file. (DOS 5.0's SYS command will do that part too, though.)
It is possible to make a disk bootable after it already has some other
<page down> for more Boo|1t Disk
files on it, but it's not easy. Well, if the disk used to be bootable
but the system files were corrupted in some way, then the SY|1S command can
probably do it. But if the disk never had the system files on it, and
there are other files on it, then the SY|1S command probably won't work,
because the system files have to go right at the beginning of the disk,
so if there are any other files in that spot, then SY|1S won't be able to
put the system files there. There are some hard drive utility packages,
such as the Norton Utilities, that can do it, by moving the other files
out of the way to make room for the system files, but the SY|1S command
just can't do it except in DOS 5 which is not so picky about such things.
What happens if you try to boot from a disk that has not been made |nboot|n-
able? Not a whole lot. That's the problem. You'll get an error message
like, "|tNon system disk|t replace and strike any key". And that's all that
will happen.
The only disks that can be bootable are A: and C:. Those are the only
ones that the computer will check. Your access light on drive B: will
come on while |sboot|sing, but that is only part of the POST. When the com-
<page down> for more Boo|1t Disk
puter gets ready to look for the system files to load them into memory,
it looks on A:, and if there is a bootable disk in that drive, then it
|sboot|ss from there; otherwise, it looks at C: to see if that one's |nboot|n-
able. If neither A: nor C: holds a bootable disk, then your computer
isn't going to do anything.
There are just a couple of brands and models of computer that can boot
from the B: drive if they're specially set up to do so, but those are few
and far between. If you don't have one of those, then there are only two
ways to ever boot from a disk in the B: drive.
One way is to open up the computer's case, switch the cables that run be-
tween the drive controller and the A: and B: drives, and then if you have
a 286 or higher machine, go into your CMOS setup and tell it that A: is
now B: and B: is now A:. Right, technically you're still not |sboot|sing
from the B: drive, because now it's the A: drive, but you're |sboot|sing
from what used to be the B: drive.
The other way is with a shareware program called B-|nBOOT|n or |nBOOT|n-B (it is
<page down> for more Boo|1t Disk
listed by different names on different |sBBS|ss). Your A: drive does have to
be in working order for this to work. The program creates a special disk
for your A: drive that is not bootable, but that has some data on it that
tells the computer to go look on the B: drive for the system files. So
when the computer tries to boot from A:, it ends up going to B:.
There are actually computer salesmen who will try to tell you that you
can use the ASSIGN command to make the computer boot from the B: drive.
This is absolutely ridiculous. Sure, you can use ASSIGN to make DOS
think that B: is A:, but as soon as you try to reboot the computer, the
reassignment is cancelled.
If you have a floppy-only system, you need to make sure you have lots of
copies of the disk you usually boot from. You never can tell when three
copies of that disk are going to go bad all at once. Keep several copies
in several different places.
If you have a hard drive and it is bootable, for heaven's sake do not
think that means you don't need to keep bootable floppies around! You
<page down> for more Boo|1t Disk
most certainly do! Hard drives die and that's all there is to it. Be-
sides, what if you're messing around trying to improve your configuration
by editing your CONFIG.SYS and/or AUTOEXEC.BAT files, and you make some
error that locks up your system? Do you think that |sreboot|sing will help
you in that case? If you reboot from the same disk that has the bad con-
figuration file, you'll just lock the system up again! You need to boot
from a floppy that has no AUTOEXEC.BAT and CONFIG.SYS files, or that has
older copies of those files, from before you messed them up. (By the
way, if you did mess them up, don't feel bad! It happens to the best of
us!)
Well, as I said, the only thing that needs to be done to make a bootable
disk, is to use the FORMAT A: /S command or else the SY|1S A: and COPY COM-
MAND.COM A: commands. A disk that has had this done to it will boot the
computer, but it may not make all of your peripherals work. Suppose you
have some unusual hard drive which requires a special device driver, such
as DMDRVR.BIN, in the CONFIG.SYS file to make the drive recognizable to
DOS? You'll be able to boot from a disk with no CONFIG.SYS file on it,
but you won't be able to use your hard drive in that case.
<page down> for more Boo|1t Disk
You really need to know what every single thing in your AUTOEXEC.BAT and
CONFIG.SYS files does, so that you'll know which ones it is absolutely
necessary for your boot disk to have on it. There are times when you
will want to boot up with the fewest possible number of commands in your
AUTOEXEC.BAT and CONFIG.SYS files, to save RAM, so you need to know what
the absolutely necessary commands for your system are. Most people can
boot up perfectly well from a disk without any AUTOEXEC.BAT or CONFIG.SYS
files, but if your system has some special configuration, you need to
know about it. So if there is some command in your CONFIG.SYS or AUTO-
EXEC.BAT file that you can't find mentioned anywhere here or in any other
DOS manual you have, or in any of the papers that came with your system,
then you need to call the dealer from whom you purchased your computer
and ask him about them.
If you have any commands in your AUTOEXEC.BAT or CONFIG.SYS files that
really have to be executed in order for your system to work properly,
then besides creating an AUTOEXEC.BAT or CONFIG.SYS file that contains
that command and putting it on your boot disk, you also need to make
sure the command file for that command is on the boot disk too. You
<page down> for more Boo|1t Disk
might be tempted to put the command into the file like this:
C:\UTIL\COMMAND
but what if your hard drive seems to have lost all its data? Your system
won't be able to access the command file on the C: drive. Make sure you
copy the command file to the boot disk and change the line in AUTOEXEC
.BAT to A:\COMMAND. Do that for every single external command (that is,
commands that are not part of |sCOMMAND.COM|s) that has to be listed in the
AUTOEXEC.BAT and CONFIG.SYS files on the bootable floppy.
Did you ever wonder how on earth you would restore your BACKUP disks if
your hard drive died and you couldn't access the RESTORE command that's
in your C:\DOS |sdirectory|s? Well you'd better put a copy of your |nRESTORE|n
.COM file onto your bootable floppy disk right now, don't you think? As
well as commands like DEBUG, FDISK, FORMAT, LABEL, SY|1S, and EDLIN.
So, you should have a few different copies of each type of bootable flop-
py that you make, and you should make several different kinds. One that
has no CONFIG.SYS or AUTOEXEC.BAT (or if you need some special device
driver to make your hard drive accessible, put the one-line CONFIG.SYS
<page down> for more Boo|1t Disk
file onto the floppy too) and another kind that will boot your system
up just the way you always have it set up. Put the same CONFIG.SYS and
AUTOEXEC.BAT files you have on your hard drive, onto the floppy, and make
all the changes necessary to make DOS able to find the command files on
the floppy instead of the hard drive. By that I mean change the commands
from C:\DOS\COMMAND to A:\COMMAND and then of course copy all the command
files to the floppy also. And whatever command you use to restore your
|sBACKUP|ss, that command file must also be there. Label those floppies like
"Clean |sBoot|s" (for the one with no AUTOEXEC.BAT and CONFIG.SYS files) and
"Full |sBoot|s" (for the one with your regular configuration files) and you
are all set for any hard drive emergency.
If you have DOS version 4, no earlier version, no later version, just 4,
and if you have a hard drive partition larger than 32 mega|sbytes|s, then
there is one more file you need to have on your boot disk! |nSHARE|n.EXE!
You absolutely and definitely and always must have that file in the same
directory with COMMAND.COM, every time you boot up, so that SHARE will
get loaded into memory, if you have version 4 and a hard drive partition
larger than 32 megs! This is true for any disk you ever boot from.
<page down> for |nCleaning|n Your Computer
|tCleaning|t Your Computer
Well, dusting the outside of the case is pretty obvious, but did you know
that you need to do the inside of the computer once in a while too? Yep,
the inside can get pretty nasty, because the fan in the power supply has
got to draw lots of air in from the front of the computer, across the
components, and out the back, to keep everything cool in there. You must
not ever do something like covering over the floppy drive openings, to
keep dirt out, because the computer desperately needs the air that goes
through there. Well, if air goes in, that's right, dust and cat hair and
stuff goes in too. Well when it starts to build up on the components, it
acts like insulation and keeps the air from cooling the components, and
you have a fried computer! So depending on how dirty the computer's en-
vironment is, about every three months you need to open up the case and
vacuum in there. Just be careful! See the section about Power for de-
tails about how to work inside the computer's case. And don't let the
vacuum attachment touch anything in there. Just get it close enough to
suck up the dirt. And while you've got the case open, go ahead and re-
seat all the cards and cables as described in that Power section.
<page down> for more Cleaning
Now for the monitor screen. Many monitors have a special coating that
protects them from damage. Well, glass cleaners can dissolve that coat-
ing. (I know, because I ruined mine that way.) If you've already used
some glass cleaner on it before you found that out, then you've probably
got a really blotchy screen from places where the coating is gone, and
places where it's still there. You may as well get that glass cleaner
back out and remove the rest of the coating. That would be better than
leaving it all blotchy like that. A tiny speck of liquid fabric softener
diluted with a bunch of water is a real good thing to clean your monitor
with, because that will help cut down on static electricity without dam-
aging that coating, if it's not already too late for that.
You should turn your keyboard upside-down and shake it, or even bump it
very gently against the desktop, every now and then to get rid of some of
the crumbs and dirt that are always getting in there. Use some alcohol
on a cotton swab or cotton ball to get the grime off the keys. If you've
got a key that's sticking real bad, pry off the cap and use some alcohol
on the inside of the cap. If you've got a keyboard that's so filthy it
doesn't work at all anymore, and you intend to throw it away and buy a
<page down> for more Cleaning
new one, there's one last-ditch effort you can make to try and save it.
There are some |skeyboard|ss that can handle being taken into the shower,
soaped up, rinsed off real well, and left to dry for a couple days. Sure
it could ruin it completely, but you were planning to throw it away any-
how, right? And if it happens to be one of those |skeyboard|ss that don't
mind water then it's fixed and you don't have to buy a new one after all!
All right, how about floppy drives? Yes, they need to be cleaned too,
with one of those disk drive head |ncleaning|n kits that you can find in most
any computer store. It's just like a floppy disk, only instead of having
a real disk inside it, there's a round piece of a sort of |ncleaning|n cloth
in there. Well you put a couple drops of this |ncleaning|n fluid that comes
in the kit, onto the cloth thing, and stick it in the drive, and issue a
DIR command on that drive to make the heads try to access the disk. That
rubs the heads against the |ncleaning|n cloth for about fifteen seconds and
then you'll get the famous "|sAbort, Retry, Fail, Ignore|s" message because
of course the heads can't find the data on that disk. If it didn't last
fifteen seconds, then hit R for Retry and do it again. Then hit A for
Abort, and you have a clean floppy drive. But you should only do it once
<page down> for more Cleaning
every six months, or whenever you're getting a lot of read errors, which-
ever comes first. That little |ncleaning|n cloth is kind of abrasive and is
not really good for the drive. The drive does need to be kept clean, but
you mustn't use those |ncleaning|n kits as often as the instructions tell
you. Remember that the people who wrote those instructions just want to
sell you more kits, and since each kit is only good for a limited number
of cleanings, then if you use it more often, you'll have to buy a new one
sooner, and that's just what they want. Then your disk drive gets ruined
sooner too, and they can sell you another one of those as well. That
would make them real happy. But that's not what you want to do, is it?
You don't have to worry about your hard drive getting dirty, because they
are very well sealed. Nothing's going to get in there.
<page down> for How Do |nDisks|n Work?
How Do |tDisks|t Work?
The easiest way to think about |ndisks|n is like a phonograph record. You
know, like an album. A disk is a round thing with a hole in the middle,
that spins around and has the head (needle) of a drive (record player)
moving back and forth across it to read the parts it wants to read. Ok,
a record player can't do that part, it can only read the whole disk from
beginning to end unless you pick up the needle and move it somewhere else
on the record. But unlike a record player, a disk drive does have some-
one standing there to pick up the head and move it to another area of the
disk whenever it wants to.
On a record player, there is only one "track" per side. That track is in
a spiral which reaches from the outside edge of the disk, all the way to
the center where the label is. That's not the case for a disk, because a
disk's tracks are concentric circles rather than one long spiral. Each
track is a closed circle, slightly smaller than the track outside it, and
slightly larger than the track inside it.
<page down> for more Disks
Each track is divided into sectors. Each |tsector|t is just a small arc of
the circle. If you cut a disk up into pieces like a pie, then one piece
of the "pie" would contain one |nsector|n from each track of the disk. A
|nsector|n holds 512 bytes of data. That's the smallest amount DOS can read
or write at a time.
Now a cylinder is all the tracks of the disk that are an equal distance
from the edge. So each cylinder of a floppy disk has only two tracks--
one on side one of the floppy, and one on side two. All the other tracks
on the floppy are some other distance from the edge.
But since a hard drive has several platters (disks) inside it, a cylinder
on a hard drive can have lots of tracks. Track 5 of side one of platter
one, track 5 of side two of platter one, track 5 of side one of platter
two, track 5 of side two of platter two, track 5 of side one of platter
three, all these tracks are in the same cylinder of the hard drive.
Ok, those were the physical parts of a disk. Now what about the logical
parts? How does DOS use disks? Well every disk has a directory and a
<page down> for more Disks
FAT. These are the parts that are used like we use the table of contents
and the index of a book. Every file that's on the disk gets a directory
entry. Every |tcluster|t of the disk gets a FAT entry, whether there is any
file in that |ncluster|n or not. Clusters are also called Allocation Units.
What's a cluster? Well, now, that's kind of tough to explain. First of
all, it depends on the size of the disk in question, and also on the ver-
sion of DOS that was used to format the disk. Sometimes a |ncluster|n is the
same as just one |ssector|s, 512 bytes (like on high density floppy disks).
Other times a |ncluster|n can be 1024 bytes (double density floppies), 2048
bytes (hard drive |spartition|ss between 16M and 128M), 4096 bytes (hard
drive |spartition|ss smaller than 16M or between 128M and 256M), 8192 bytes
(256M to 512M), or 16,384 bytes (larger than 512M hard drive |spartition|ss).
You see, since every |ncluster|n of a disk has to have a FAT entry, then if
the size of the |ncluster|n was only the same as the |ssector|s size, the FAT
would have to be awfully big to hold an entry for every |ncluster|n of the
disk.
So for most |ndisks|n, DOS uses clusters that are larger than the |ssector|ss.
<page down> for more Disks
That way the FAT can remain at a reasonable size. But there's a problem
with that. Since there can only be one filename in each FAT entry, DOS
wastes a lot of space on hard drives. A bunch of space even gets wasted
on floppy |ndisks|n too, but not as much, because of the smaller clusters.
If you write a 27-byte file to disk, it takes up a whole cluster of disk
space because there is only one FAT entry for each cluster, and there can
only be one file for each FAT entry. So on a floppy disk with 512-byte
clusters, that 27-byte file causes 485 bytes worth of disk space to be
wasted! (That's called "|tslack space|t".) On most hard |ndisks|n the cluster
size is 4 |ssector|ss, or 2048 bytes, so that 27-byte file is wasting 2021
bytes of disk space! It boggles the mind, doesn't it?
If you have a hard drive that is 16M or smaller, then DOS is probably
giving you 4096-byte clusters! That 27-byte file is now wasting 4069
bytes of disk space! Even if you have a very large hard drive, if you
have it partitioned into logical drives that are smaller than 16M, you
still have that ridiculous 8-|ssector|s cluster size. You'd better get your
drive repartitioned if you can! The FDISK command can do that. The same
<page down> for more Disks
8-|ssector|s cluster size goes for |spartition|ss between 128M and 256M too, and
larger |spartition|ss than that get even huger cluster sizes!
This is why sometimes when you're trying to copy 357K worth of files to a
360K disk, you can sometimes get a "|tdisk full|t" error message. (See also
Directory.) Now that one is really confusing unless you know this about
how DOS won't use up the end of a cluster for a new file if there is al-
ready a file using up part of that cluster.
This is also why it's important to try to combine all your teeny tiny
batch files into one big batch file. I have one batch file (other than
|sAUTOEXEC.BAT|s) on my entire hard drive, and it can perform 49 different
functions. Its size is 12,538 so it takes up 7 clusters or 14,336 bytes
worth of disk space. If I had it all broken down into 49 batch files,
the way most people do, it would be taking up 49 clusters or 100,352
bytes of disk space! See the section on the GOTO command to see how to
combine the small batch files into one large one like that.
<page down> for The |nFile Creation Error|n Message
The |tFile Creation Error|t Message
This message comes when DOS tries to create a file and fails. This can
happen for several reasons. The most common, at least for me, is when
you try to COPY a file over top of another file, but the target copy has
its Read-only attribute set. Well what happens is that first DOS tries
to copy the new file over the old one, but since the old one is Read-only
that won't work, so DOS tries to create a new file by that same name.
But since you can't have more than one file by the same name in one dir-
ectory, that causes this error. If this happens to you, use the ATTRIB
command to remove the Read-only attribute from that target file, and then
you'll be able to copy over it. Think about it for a second first though
because Read-only attributes generally don't get set without a reason.
Another thing that can cause this error is if the disk is full, or if the
root directory is full. Remember you can only have a limited number of
files in a root directory. But if you're trying to copy a file to a sub-
|ndirectory|n, and none of these other reasons pan out, then use the CHKDSK
command to see if the subdirectory has a problem of some sort.
<page down> for The |nKeyboard|n
The |tKeyboard|t
Well, you know what the |nkeyboard|n is, so why am I writing a chapter about
it? Well there are quite a few things you might not know about it, even
though all its keys are labeled.
First, the most important thing that's not written on the |nkeyboard|n, is
that you can BREAK out of many programs by holding down the <Ctrl> key
while pressing the <C> or <Break> keys. (The <Break> key is up there
near the <PrtScrn> key, usually on the same physical key with <Pause>.
If you're not pressing <Ctrl> when you hit that key, it means <Pause>, or
if you are pressing <Ctrl>, then that key means <Break>.) This keystroke
combination can be abbreviated as <Ctrl-C> or <Ctrl-Break>, and if you
want to get out of nearly any DOS command, and many other commands too,
this keystroke will usually take you straight back to a DOS prompt.
There is a difference between <Ctrl-C> and <Ctrl-Break>, though. If you
have already entered some keystrokes that haven't been processed yet,
that is, if you're typing faster than the computer is computing, the un-
processed keystrokes are still sitting in the |nkeyboard|n buffer. Well, the
<page down> for more Keyboard
<Ctrl-C> keystroke will sit there at the end of the buffer, just like any
other keystroke, waiting for its turn to be processed. But <Ctrl-Break>
will cut in front of everybody else in line. So it will work sometimes
when <Ctrl-C> won't.
If your computer is spitting out a bunch of data onto the screen a lot
faster than you can read it, you can stop it with the <Pause> key if you
have one, or else the <Ctrl-S> combination. Press any other key to make
the screen start going again. (Sometimes you have to use <Ctrl-Q> to
make it start going again after using <Ctrl-S>.)
<Ctrl-Z> or <F6> will give you a symbol that looks like ^Z which is the
End-of-File character. (The caret (^) symbol means <Ctrl>). If you are
using the COPY CON command, or the SORT command without any redirection
of input, then ^Z is what tells DOS you're done entering data from the
|nkeyboard|n as far as that specific COPY CON or SORT operation is concerned.
The <Esc> key, at the DOS command line, will cancel what you were typing
and move the cursor down one line so that you can start over on the com-
<page down> for more Keyboard
mand you were getting ready to enter.
In a lot of programs, you can enter ASCII symbols that aren't on the key-
board, by holding down the <Alt> key, and typing the ASCII code on the
numeric keypad, and then letting up on the <Alt> key. For example, if
you use this method to type <Alt-20>, you get the character. A really
interesting use for this fact is with ASCII character 255. It's called a
blank. It looks like a <Space>, but it's not. It's an actual character,
and it's even valid in filenames. So you can use it as a primitive sort
of security. You never want to use it in the middle of a filename, be-
cause everybody knows that a <Space> is not a legal filename character,
so anyone who sees a filename like MY STUFF.TXT is going to realize right
away that it's an <Alt-255> instead of a <Space> in there. But since DOS
displays filenames in DIR listings in two columns, with spaces between, a
filename like MYSTUFF<Alt-255>.TXT will look like "MYSTUFF TXT" and any-
one who's not really familiar with the <Alt-255> trick won't realize that
filename is anything other than MYSTUFF.TXT. Well there's still another
problem with this. If you have DOS 5 and a body used the /B or /W swit-
ches with the DIR command, that filename will look like "MYSTUFF .TXT"
<page down> for more Keyboard
and once again, anyone who knows about <Alt-255> will figure it out right
away. The same thing would happen with the output of the CHKDSK command
with the /V switch. But, if you don't give the filename an extension,
then MYSTUFF<Alt-255> will look exactly like MYSTUFF in any sort of dir-
ectory listing. This is good for directory names, too. You could name
a directory PCT<Alt-255><Alt-255><Alt-255>, and even someone who knows
about the <Alt-255> trick won't be all that likely to try three of them
in a row like that. Well this method of protection is good if all the
other people who use your computer are really beginners, who don't know
about <Alt-255>, but it's still a pain to live with it. Because you have
to type the <Alt-255> part of the filename or directory name, every time
you want to access it. You even have to include the <Alt-255> in the
name, on your PATH command in AUTOEXEC.BAT if you want that directory to
be on the path.
If you have a numeric keypad, then you have a <NumLock> key to control
it. If <NumLock> is on, then the numeric keypad will type numbers. If
it is off, the arrows and other functions on the numeric keypad will be
activated. Most newer computers will boot up with the <NumLock> key on
<page down> for more Keyboard
automatically, but there are tons of little public domain utilities that
you can use as commands in your AUTOEXEC.BAT file, to turn it back off
again. The same goes for the <CapsLock> key, if you want to always boot
up with it on.
<ScrollLock> has practically no use. For software programs that use it,
it works this way: with the key set one way, when you use the arrow keys
to scroll through a file, the cursor will stay right on the same place on
the screen, changing lines as the lines go by. With the <ScrollLock> key
set the other way, when you scroll through the file, the cursor will move
on the screen, staying on the same line of text, or until that line gets
to the edge of the screen, anyway.
The <PrtScrn> key, or on some computers, the <Shift-PrtScrn> combination,
will cause the computer to send a copy of whatever's on your screen to
the PRN device. If the PRN device is not connected, is not turned on, or
is not online, your whole system could just hang until the print request
times out. If trying to print a graphics screen causes your printer to
go nuts, then try the GRAPHICS command first.
<page down> for more Keyboard
The <Ctrl-Alt-Del> keystroke combination will reboot your computer.
The <F1> through <F10> Function keys have different functions according
to what software program you're running at the moment, but when you're in
DOS, they have their own functions. (See editing keys.) You can also
program them to do whatever you want them to do, with ANSI.SYS.
The <F11> and <F12> Function keys don't do anything, as far as most soft-
ware programs are concerned.
The <Enter> key has lots of names. <Return> and <Carriage Return> and
<CR> are just a couple. Some keyboards have just an arrow like ─┘ on
that key instead of a word. It's the one over on the right of the alpha-
bet keys, between the Right <Shift> and the <Backspace> keys, and it is
nearly the most important key you have. It's what tells DOS you're done
typing a command, and that you want DOS to execute that command now.
<Ctrl-P> will toggle printer echoing. That means it will cause the prin-
ter to start printing everything that appears on your screen. To make it
<page down> for more Keyboard
stop doing that, press <Ctrl-P> again.
A lot of books will tell you to find a key that looks like │ in order to
perform an operation called piping, which is a form of redirection. Well
the key you're looking for looks like || instead of │, but the books just
can't print a || character I guess. The || character is the <Shift> ver-
sion of the backslash (\), and its location depends on the |nkeyboard|n you
use. It's one of those keys that move around from brand to brand of key-
board. Most keys are in the same place no matter what kind of |nkeyboard|n,
but not that one. On the three keyboards I've used extensively, that key
has been located in three different places. Once near the <Backspace>,
once below the <Enter>, and once in the lower lefthand corner. Sheesh!
Always remember that when you see the symbol ^C or ^Z or anything like
that, it means <Ctrl-C> or <Ctrl-Z>, not the <Shift>ed 6 ^ symbol.
If your |nkeyboard|n acts up after you get DOS 5, pretending like CAPS LOCK's
on when it's not and things like that, try the command KEYB US /E (or use
LOADHIGH with it since it's a |sTSR|s) in your AUTOEXEC.BAT file.
<page down> for How Does |nMagnetism|n Affect Disks?
How Does |tMagnetism|t Affect |sDisks|s?
Well, |nmagnetism|n is what puts the data onto your disks. So obviously any
magnetic field can change the data that's on a disk. They make a device
called a degausser, which is just a strong magnet, to totally and com-
pletely erase a disk. (Quite often a disk that just won't FORMAT proper-
ly can be fixed up by a magnet. It will erase all traces of any data,
or even the previous format itself, so that the disk is just as blank as
when you bought it, and now it will format properly.) If you need a de-
gausser and don't have one, a stereo speaker generally works pretty well.
Just lean your disk up against it and crank up some Judas Priest, and
your disk ought to get degaussed.
All right, so obviously you don't want to tack a disk up to the side of
your filing cabinet with a magnet, but what else do you want to watch out
for? Well your monitor is about the worst culprit. There's a tremendous
magnetic field in there, and it comes out especially strongly from the
back and the top. If you have one of those old phones that has an actual
bell-like ring, rather than one of the newer electronic beeping rings,
<page down> for more Magnetism
then your phone gives a pretty decent magnetic field every time it rings.
Some people say that even the cord running from the phone to the wall,
and speaker wires, and any sort of electric wire, also give off a magnet-
ic field. I don't know if that's true or not, but, better safe than
sorry, eh?
Just about anything electrical, especially anything with a motor in it,
causes a magnetic field. Yes, that includes your printer and your fluor-
escent desk lamp. (Fluorescent lamps do some really strange things to
your monitor, too, if it's sitting too close.)
Well gosh, you say, there's electricity everywhere! How am I supposed to
keep any data on my |sdisks|s? Well, it's really not as bad as I've made it
sound. All of these things can possibly wipe the data from a disk, but
it doesn't happen that often. The disk has to be exposed to the field
for a while before anything usually happens to the data, depending on the
strength of the field. Just don't lean a disk up against the phone, or
set it on top of the printer, for more than a couple minutes. Try to
keep your disks at least a foot away from all the things I've mentioned,
<page down> for more Magnetism
but you don't necessarily have to panic if you forget and lean a disk
against your electric stapler for a minute.
Also remember that a pattern of magnetic particles (your data) on a disk
will tend to fade over time. The older a disk is, the easier it would be
for a magnetic field to trash your data, because the pattern of magnetic
particles has begun to fade. That's why you ought to refresh all your
floppies every couple years by using the PC Tools PCFORMAT command with
the /R switch. (I would imagine that the Norton Utilities has a similar
feature as well; I just don't know what it's named.) This will read each
track's worth of data into memory, format that track, and then write the
data from memory back to the floppy disk at full strength.
This also needs to be done to a hard drive every couple years (unless you
have one of the new IDE drives which must never be |nLow-Level|n Formatted).
But the FORMAT command won't do it. Because you see, in a hard disk, the
format is done in two separate steps. You could think of the |tLow-Level|t
Format as putting a coat of sealant on the parking lot before the FORMAT
command paints the lines on the lot. On floppy disks, the FORMAT command
<page down> for more Magnetism
performs both of those steps, but not on a hard disk.
There are utilities such as SpinRite and one of the features of Norton
Utilities, and version 7 of PC Tools, that will do a Low-Level Format the
same way the /R switch of PCFORMAT works--it reads one track of data into
memory, formats that track, and then writes the data back to the disk.
That means your data most likely will not be lost during the Low-Level
Formatting process.
In general though, a Low-Level Format will erase every speck of data from
a disk, so thoroughly that no recovery utility in the world can get it
back. So here are the steps to follow to perform a Low-Level Format:
1. BACKUP
2. Low-Level Format
How, you say? Well most hard drive controllers have the
code which performs a Low-Level Format stored in a ROM chip right there
on the controller. You can use DOS's DEBUG command to access it. The
instructions and the applicable ROM memory address will be found in the
literature that came with your drive, or you can contact the dealer or
<page down> for more Magnetism
the manufacturer.
3. FDISK
4. FORMAT C: /S
5. Mark out |sBad Sector|ss!
The FORMAT command does not always find all of the unusable
|ssector|ss! Before you restore your data from your backup disks, you need
to run some disk diagnostic utility, such as the Surface Scan option of
PC Tools DISKFIX, to check the whole drive for |sbad sector|ss and mark them
as "bad" in the FAT so that DOS won't put any of your data in a bad spot.
The FORMAT command is supposed to do this for you, but it's not totally
reliable. So if you have such a utility, use it at this time!
6. RESTORE
That's all! Now you have a nice fresh hard drive with nice fresh data!
But remember, don't ever do a Low-Level Format if you have an IDE drive,
and don't ever do it without having a complete backup! Even the non-de-
structive Low-Level Formats like SpinRite can goof up once in a while!
Don't worry about the fact that you mustn't Low-Level an IDE drive. They
use a different type of technology than older drives, and they don't have
any need to be Low-Levelled. So it's ok that you can't do it.
<page down> for Numbering Systems
Numbering Systems
You don't have to know this stuff if you don't want to. Well it is pret-
ty important, but not learning it is not going to make your computer use-
less or anything.
The |tdecimal|t numbering system is the one you've been using all your life.
It uses ten (10) as its base number. (There are ten symbols in our num-
bering system: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.) That means that in a
multi-digit number, the rightmost digit tells how many multiples of 10-
to-the-0th-|npower|n are in the number. (N^0=1) The first digit from the
right tells how many multiples of 10-to-the-1st-|npower|n are in the number.
(N^1=N) The second digit from the right tells how many multiples of 10-
to-the-2nd-|npower|n are in the number. (N^2=NxN) The third digit from the
right tells how many multiples of 10-to-the-3rd-|npower|n are in the number.
(N^3=NxNxN) Et cetera. (In math, the symbol ^N means to-the-Nth-|npower|n.)
All right, suppose we have a number in the |ndecimal|n system that looks like
589,236. Well, what does that number mean?
<page down> for more Decimal, Binary, Hexadecimal
5 4 3 2 1 0---how many digits from right
5 8 9 2 3 6---the digits in the number
6x10^0=6x1=6
3x10^1=3x10=30
2x10^2=2x100=200
9x10^3=9x1000=9000
8x10^4=8x10000=80000
5x10^5=5x100000=500000
Now, add up the totals from each line, and you've got 589,236. That's
right, that's just the number we started with. That's because we just
converted a |ndecimal|n number right back to a |ndecimal|n value.
But computers can't deal with the |ndecimal|n system. A computer can only
distinguish between two things. Either a particular circuit has power
running through it, or it doesn't. Either on or off. One or zero. So
computers use the |tbinary|t numbering system. |nBinary|n means two, so the bi-
nary system has only two different digits. Zero, and one. That's all
there is. There is no 2, no 3, no 4, nothing but 0 and 1. What kind of
numbers can you make with only two possible symbols? Any numbers you can
<page down> for more Decimal, Binary, Hexadecimal
make with ten symbols. It just takes more digits to do it.
So, suppose we have a |nbinary|n number like 10110101101. What does it mean?
10 9 8 7 6 5 4 3 2 1 0
1 0 1 1 0 1 0 1 1 0 1
1x2^0=1x1=1
0x2^1=0x2=0
1x2^2=1x4=4
1x2^3=1x8=8
0x2^4=0x16=0
1x2^5=1x32=32
0x2^6=0x64=0
1x2^7=1x128=128
1x2^8=1x256=256
0x2^9=0x512=0
1x2^10=1x1024=1024
Now, add up the totals from each line, and you've got 1453. You've just
converted a number from |nbinary|n to decimal! Aren't you proud?
<page down> for more Decimal, Binary, Hexadecimal
Now we're going to convert that |ndecimal|n number back to binary! Aren't
you excited about that prospect? Here goes. Well, we know that 1453 is
larger than 2^10. But is it larger than 2^11? Well 2^11=2048, so no,
our |nbinary|n number won't need an eleventh digit. (It will have eleven
digits, but the first one is the zeroth digit, so the eleventh one is
digit number ten. Clear as mud, right?) All right, we know that we're
going to need a 1 in the tenth digit, because our number is larger than
2^10 which is 1024. So, subtract 1024 from our number, and we have 429
left. Well, do we need a one in the ninth digit? 2^9=512, and 429 is
less than that, so no, we won't need a number in the ninth digit. Fill
it up with a zero. What about the eighth digit? 2^8=256, and 429 is
larger than that, so we need a one in the eighth digit. 429-256=173 so
that's the next number we're going to work with. Do we need a one in the
seventh digit? 2^7=128, and 173 is larger than that so we do need a one
in the seventh digit. 173-128=45. 2^6=64, so we don't need a one in the
sixth digit. Fill that space with a zero. 2^5=32 and 45 is larger than
that, so we need a one in the fifth digit. 45-32=13 and 2^4=16, so the
fourth digit gets a zero. 2^3=8 and 13 is larger than that so the third
digit gets a one. 13-8=5 and 2^2=4 so the second digit gets a one. 5-4
<page down> for more Decimal, Binary, Hexadecimal
=1 and 2^1=2 so the first digit from the right gets a zero, and 2^0 is 1
and 1 is what we had left, so the rightmost digit gets a 1. So, here's
what we've got: 10110101101 Yep, that's just what we started with!
Ok, now to the |thexadecimal|t system of numbering. Hex means six and deci-
mal means ten so |nhexadecimal|n means sixteen. That's the base number of
this system, just like ten is the base in the |ndecimal|n system and two is
the base in the |nbinary|n system. There are sixteen symbols in the hex sys-
tem: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. We use this
system with computers a lot because it's a lot closer to |nbinary|n than dec-
imal is, since sixteen is two to the fourth |npower|n and ten is not an even
|npower|n of two at all. But yet, hex is definitely closer to |ndecimal|n too,
since you don't have to use eleven digits just to represent the number
1453 like you do in |nbinary|n.
So, if we have a hex number like 3FA8C, what does it mean?
<page down> for more Decimal, Binary, Hexadecimal
4 3 2 1 0--how many digits from right
3 F A 8 C--the digits in the number
3 15 10 8 12--|ndecimal|n representation of hex digit
12x16^0=12x1=12
8x16^1=8x16=128
10x16^2=10x256=2560
15x16^3=15x4096=61440
3x16^4=3x65536=196608
All right, add up those totals from each line, and you've got 260748.
That's what 3FA8C hex is, in |ndecimal|n. Want to convert 260748 back to
hex? I knew you did. Ok, let's go.
Well 16^5=1048576 and 260748 is much less than that, so we will not need
a fifth digit at all. 16^4=65536 and 260748 is larger than that so we
will need a fourth digit, but what number should go in that digit? Div-
ide 260748 by 65536, and you see that we need a 3 in that digit. What's
left over after we subtract 3x65536 from 260748? 64140. Well, 16^3=4096
and 64140 is way bigger than that, so we won't want a zero in the third
digit, but what do we want to put there? Divide 64140 by 4096, and we
<page down> for more Decimal, Binary, Hexadecimal
get a 15 which is an F in hex. Now, subtract 15x4096 from 64140, and our
remainder is 2700. 16^2=256 and 2700 is lots bigger than that. Do your
division, and 10 |ndecimal|n or A hex goes in the second digit, with 140 left
over. 16^1=16 and 140 is bigger than that. Divide. The first digit is
8 with 12 left over, and 12 in hex is C so that's the zeroth digit. Put
it all together and you've got 3FA8C. Yep, that's what we had to begin
with, so the conversion worked perfectly. Whew!
If you don't understand how it is that we're doing this decimal-to-what-
ever conversion stuff, maybe it would help if we tried using the same
method to convert a |ndecimal|n number to decimal? Let's try it, with the
number 857203. Well 10^6=1000000 and 857203 isn't that big, so we won't
need any number in the sixth digit. 10^5=100000 and 857203 is bigger
than that so what number do we need in the fifth digit? Divide 857203
by 100000 and you get 8. So subtract 8x100000 from 857203 and you have
57203 left. 10^4=10000 and 57203 is larger than that, and if you divide
57203 by 10000, you get a 5 for the fourth digit, and if you subtract 5x
10000 from 57203 you have 7203 left. Well, 10^3=1000 and 7203 is larger
than that, so if you divide 7203 by 1000 you get 7 so that's the third
<page down> for more Decimal, Binary, Hexadecimal
digit, and if you subtract 7x1000 from 7203 you get 203. Well 10^2=100
and if you divide 203 by 100 you get a 2 for the second digit, with 3
left over. 10^1=10 and 3 is not that big so a zero goes in the first
digit from the leftmost one. 10^0=1 and 3 is 3 times that, so a 3 goes
in the zeroth digit. Put them all together, and you've got 857203.
Ok, should we do the octal system of numbers next? Well octal means 8 so
the octal system has eight digits. 0, 1, 2, 3, 4, 5, 6, and 7. I'll
leave the rest of it up to you if you're interested. It works just the
same way as the other systems.
Just one more thing. If you ever need to convert an eight-digit |nbinary|n
number to hex, or convert a two-digit hex number to |nbinary|n, there's a
very easy way to do it. First, each digit in a |nbinary|n number is a bit.
Eight |nBInary|n digiTS (bits) is a byte. Four |nbinary|n digits, half a byte,
is a nibble, believe it or not. Well if you have a |nbinary|n number like
10110011, first divide that into two nibbles. The leftmost nibble is
1011 and the rightmost nibble is 0011. Now, all you have to do to con-
vert that whole byte to hex, is to convert the left nibble to hex and
<page down> for more Decimal, Binary, Hexadecimal
convert the right nibble to hex, and stick those two numbers together.
1011 0011
1x2^0=1x1=1 1x2^0=1x1=1
1x2^1=1x2=2 1x2^1=1x2=2
0x2^2=0x4=0 0x2^2=0x4=0
1x2^3=1x8=8 0x2^3=0x8=0
total=11 decimal=B hex total=3 decimal=3 hex
So, 10110011 in |nbinary|n equals B3 in |nhexadecimal|n. To convert a two-digit
hex number to |nbinary|n, just do the opposite. Convert the left digit to
|ndecimal|n and then |nbinary|n, and convert the right digit to |ndecimal|n and then
|nbinary|n and stick the righthand |nbinary|n number up against the right of the
lefthand |nbinary|n number, and there you go.
So, did you notice anything familiar in that section on |nbinary|n numbers?
Did the numbers 64, 128, 256, 512, or especially 1024 ring a bell? Have
you ever wondered why a kilobyte is equal to such a silly number as 1024
bytes, instead of 1000 |sbytes|s? That's because computers do things in bi-
nary, not |ndecimal|n. The number 1000 in |ndecimal|n, is 1111101000 in |nbinary|n.
We don't want to make the computer try to work with a number like that,
<page down> for more Decimal, Binary, Hexadecimal
do we? While two to the tenth |npower|n is 1024 in |ndecimal|n, in |nbinary|n it's
10000000000 and that's a nice easy round number for the computer.
Those other numbers I mentioned are going to end up being very familiar
to you as well if you pay any attention at all to what your computer does
with memory and disk space and stuff. 512 is 2^9, 256 is 2^8, 128 is
2^7, and 64 is 2^6 and they are very common numbers when talking about
memory. As far as the computer is concerned, they are the round numbers
1000000000, 100000000, 10000000, and 1000000 and it's only because they
have been translated into |ndecimal|n that they seem to be nonsense.
When you see something like 10h or 10H that means the number 10 in hex-
adecimal, which is 16 in |ndecimal|n. Some books will even say 10d or 10D,
to avoid ambiguity even when they're talking about |ndecimal|n numbers.
<page down> for What Are Parameters?
What Are |tParameters|t?
|nParameters|n are anything that comes after the command on the command line.
They tell DOS what you want to do with the command. Take, for instance,
the COPY command. You can't just tell DOS to "copy". You have to say
what you want to copy and where you want it copied to. So you might give
a command like COPY A:FILE.TXT B:, which tells DOS to copy the file named
FILE.TXT which is on the A: drive, over to the B: drive. In this case,
"A:FILE.TXT" is the parameter that tells DOS the source for the COPY com-
mand, and "B:" is the parameter that tells the target.
There is another type of parameter called a "switch". The /P in the com-
mand DIR /P is a switch that tells DOS to "pause" after 23 lines of the
output of the DIR command, so that you have time to see what it says, and
then you strike any key to make the display continue on with the next 23
lines.
DOS always uses "/" as the switch character, but some programs, such as
the compression utility PKZIP, use "-" as in PKZIP -a FILE *.*. A switch
<page down> for more Parameters
is just a parameter that tells the program to "do its thing" in a slight-
ly different way than normal.
The first "word" that is typed on the command line after the name of the
command is parameter number one, and the second "word" is parameter two,
etc. By "word" I mean something that is surrounded by spaces. So even
though you wouldn't normally think of "B:" as being a "word", in this
case it is, since in the command COPY A:FILE.TXT B: it is surrounded by
spaces. So it is parameter number two.
|tReplaceable|t |nparameters|n are very useful in batch files. What this term
means is a little symbol in a batch file that looks like %1 or %2 and it
is "replaced" by whatever you happened to type as parameter number one or
number two on the command line. An example would be the best definition.
Suppose you create a batch file called AB.BAT that looks like this:
@|sECHO|s OFF
COPY A:%1 B:
Now if you were to type this command on the command line:
<page down> for more Parameters
AB FILE.TXT
Then, when DOS is processing that command, it sees the %1 symbol inside
the batch file and looks back on the command line to see what you had
typed as the first "word" after the command AB, and it sees FILE.TXT, so
it puts FILE.TXT there where the batch file says %1, and this is the com-
mand that DOS executes:
COPY A:FILE.TXT B:
Now suppose the next time you run that AB.BAT file, you use this command
instead:
AB HELLO.TXT
This time when DOS gets to the line that has the %1 symbol, and looks on
the command line and sees HELLO.TXT as the first parameter, then this is
the command that gets executed:
COPY A:HELLO.TXT B:
Now you can see that a file like AB.BAT is not going to save you all that
much typing, but how about a command like PROMPT $e[1;32;40m. That's the
command you want to use to change your DOS colors to bold green on black.
Not exactly an easy-to-remember command. You can create a batch file
<page down> for more Parameters
that will remember that command for you, like this COLOR.BAT:
@|sPROMPT|s $e[1;3%1;4%2m
(leave a blank line here!)
@|sECHO|s OFF
PROMPT $P$G
Now if you were to type COLOR 2 0 on the command line, DOS would put the
2 in place of the %1, and 0 in place of the %2, and that same $e[1;32;40m
parameter for the PROMPT command would be used, without your memorizing
that complicated syntax. Just don't forget to leave that blank line.
If you got bored with green-on-black, you could just type COLOR 7 4 and
DOS would put the 7 where the %1 is, and 4 where the %2 is, and this time
you'd get bold white on blue. (See the subject ANSI.SYS for the color
codes and further information about how to change your DOS colors.)
You can use replaceable |nparameters|n to take the place of any part of a
command, even the command itself. Suppose you do a lot of changes on
your AUTOEXEC.BAT file, and you're tired of typing that filename. You
could have a batch file called AEB.BAT that looks like this:
<page down> for more Parameters
@|sECHO|s OFF
%1 AUTOEXEC.BAT %2
Now if you typed AEB TYPE, then the command TYPE AUTOEXEC.BAT would be
executed, or if you typed AEB EDLIN, then EDLIN AUTOEXEC.BAT would be
executed, because if there is no third word typed on the command line,
then %2 equals nothing, so having that %2 sitting there won't cause any
trouble. If you typed the command AEB COPY B:, then the command COPY
AUTOEXEC.BAT B: would be executed, and you'd have a backup copy of your
file, for in case the copy on your hard drive gets damaged in some way.
Replaceable |nparameters|n are one of my favorite toys in DOS. There are a
zillion things you can use them for. The parameter %0 always stands for
the name of the batch file that contains the %0 symbol, since the name of
the batch file is the first "word" on the command line, and %0 is the
first replaceable parameter. But other than that, you can use the other
replaceable |nparameters|n, %1 through %9, for anything your heart desires.
See also GOTO and SHIFT.
<page down> for Why Do I Need to |nPark|n My Hard Drive?
Why Do I Need to |tPark|t My Hard Drive?
A hard drive is sort of like a record player, in that it has some disks
that hold information, and heads that move on an arm to read that infor-
mation. Only the read/write heads on the hard drive float a hair's
breadth above the surface of the disks.
Now when someone bumps into the computer, the heads might get jarred and
crash into the surface of the disk, which would most likely damage the
data in that spot of the disk, and the heads, and even the disk itself.
If there's a power surge in the electric lines, a shock might go through
the computer, including the heads on the disk, and that would also damage
the data in whatever spot the heads happened to be above at that moment.
When you turn off the computer's power, the drive stops spinning, and so
there is no air |ncurrent|n to keep the heads floating above the disk, and
they land. And when you start the computer up again, the heads are still
resting on the disk as it starts to spin, until it gets to spinning fast
<page down> for more Park
enough to create the air |ncurrent|n that causes the heads to float. Again,
whatever data is under those heads as the disk scrapes along under them,
can be damaged. Even that spot of the disk itself can be damaged.
And every time you turn on the power to your computer, there is a sudden
shock of voltage moving through all parts of the computer's circuitry.
Again, whatever part of the disk the heads happen to be sitting above,
could very well lose its data.
Parking a hard drive means that the read/write heads are moved over to an
area of the disk called the landing zone, so that any of these events can
happen and no data will be damaged. Only an unused portion of the disk
might be damaged. No problem. Some people think that parking the drive
means stopping the spinning. Nope, it keeps right on spinning at the
same speed as always (3600 revolutions per minute), it's just that the
part of the disk the heads are sitting above is the blank space near the
center of the disk.
Most recent models of hard drives use voice coil rather than stepper mo-
<page down> for more Park
tor actuators, and these are self-parking. That means that whenever pow-
er is removed, the heads automatically retract to the parked position.
Immediately. Because the heads are on a spring. The electric |ncurrent|n
counteracts the spring, but when you shut off the power, there's nothing
to counteract the spring so, zip! The spring pulls the heads into pos-
ition over the landing zone.
That means that turning on the power again is not a threat to your data,
but what about the whole time it's running? Obviously you can't have the
heads parked the whole time, or you couldn't get any work done. But if
you get up for a cup of coffee, or to answer the doorbell, what if the
dog rushes past and bumps into the computer? What if there's a power
surge? The more often the heads are parked, the more often your data is
safe.
If you can call the manufacturer of your hard drive, and ask them if it's
ok for your particular brand and model, you should |npark|n your hard drive
every time you leave your desk for a second!
<page down> for more Park
But be aware that I meant it when I said to ask the manufacturer of your
specific disk, because using a parking program that was made for one type
of disk, on another type of disk, can ruin the drive! Some people even
say that parking any self-parking drive with a |npark|n command, can damage
it. I don't believe that, the company that built my hard drive told me
it's not true, and many of my self-parking-drive-owning friends have used
parking programs with no ill effects. But you never know, maybe it is
true for some self-parking drives.
If you have an older hard drive which uses a stepper motor instead of
a voice coil actuator, you really need to use a parking program! It's
likely that one came with your disk. If so, use it every time you leave
your desk, and especially make it the last thing you do before each time
you turn off the |spower|s!
Some older parking programs can be really dangerous, as they were intend-
ed for only one particular type of hard drive, and as I said, using the
wrong parking program for the drive can ruin it! But parking programs
written recently generally check the BIOS to see where is the safe area
<page down> for more Park
to |npark|n on your particular drive, before doing anything else. These pro-
grams are safe to use on any drive, if your BIOS is correct.
If you have a 286 or newer machine, do you know who entered your CMOS
|ssetup|s? Was it someone reliable, or was it the computer salesman? (Those
are mutually exclusive categories.) You might want to call the manufac-
turer of the drive and make sure you have the right numbers in CMOS for
the write precomp and landing zone especially, along with all the other
hard drive settings.
Many commercial disk utility packages such as PC Tools and SpinRite in-
clude a |nPARK|n.COM file. There is even a public domain parking program
called TIMEPARK that is a TSR, that parks your hard drive every time it
hasn't been accessed for X minutes (you choose what the X number is). If
your hard drive manufacturer says it's ok, then using a parker like that
one is the ultimate in safety!
Now, how do you unpark your drive when you need to access it again? Well
if you have a PC or XT, I think all of those had parking programs that
<page down> for more Park
couldn't be unparked without a cold boot. If that's the case with your
parking program, you will get a message on your screen every time you
|npark|n, that says something like "Turn power off now". See if you can call
the manufacturer of your hard drive and ask them if there is a newer
parking program that's safe to use on your disk.
Otherwise, all parking programs allow the heads to unpark the second any
software requests a disk access, whether you've |sreboot|sed since you parked
or not. For that reason you have to make sure that |nPARK|n is the last com-
mand you give before shutting off the computer. If any other external
command is entered, the heads will unpark in order to read the command
file and execute it, so it's like you hadn't bothered to |npark|n at all!
<page down> for How Does |nPower|n Affect Your Computer?
How Does |tPower|t Affect Your Computer?
Well, besides the obvious--that the computer doesn't run without |npower|n--
there are other things to consider. (See also Park.)
One is tied right in to the fact that the computer only runs if it has
|npower|n. All the data that's temporarily stored in RAM while the computer
is working on that data, will be lost totally and completely if you have
a sudden |npower|n outage. (See also Shelling Out for more info about things
that happen if you |sreboot|s--or if a |npower|n outage |sreboot|ss for you--while
you're in the middle of an application.) So you need to save what you're
working on, to your disk, very often. That way, if the |npower|n goes out,
you only lose what you had done since you saved your work ten minutes ago
instead of losing everything you did since you saved three hours ago.
Remember that "data in |sRAM|s" includes everything that's sitting on your
RAMdisk too. So if you're working on a file from the RAMdisk, saving it
back to the RAMdisk every ten minutes won't help you if the |npower|n goes
out. You need to save your work to a real disk, either hard or floppy.
<page down> for more Power
Another factor that computer users need to worry about is |nPower|n Surges.
Wouldn't it be nice if the electricity that comes out of the wall were at
a nice constant 110 volts or whatever it's supposed to be? But that's
not the case. Besides "power hits", where the voltage goes way down for
just a second, there are also Surges, where the voltage goes way up for
a second. This also can be quite damaging to computers, TVs, and other
electronic devices. Especially computers.
You can buy special |npower|n strips that act as "Surge Suppressors", for
about $15, but those don't do you very much good. They're better than
no Surge protection at all, of course, but those cheap ones just don't do
a very good job! The ones in the $80 price range really do work pretty
well. There are even a couple of companies that guarantee both the Surge
Suppressor and your equipment that's plugged into it! If their Suppress-
or fails and your computer gets trashed, they will pay for all of the re-
pairs! Of course, that doesn't help you to replace all the data that was
on your hard drive. That's what frequent |sBACKUP|ss are for! But it sure
does prove that the company has confidence in the product so it must be
pretty good.
<page down> for more Power
(The next paragraph may or may not be true. It was true a few years ago,
but I've heard in a couple places that the |npower|n supplies they're putting
into computers these days take care of this problem all by themselves. I
don't know if that's completely true or not, so I'm going to mention it.)
Ever notice how a light bulb usually burns out right when you turn on the
switch? Any time you turn on an electrical device, a sudden shock of
high voltage goes through every component in the device. Personally, I
don't want to subject my computer to that shock any more often than ab-
solutely necessary! This is part of the raging debate over whether a
body should leave his computer on all day long, or whether he should turn
it off when he's not using it. Turning it off is not a problem, but
turning it back on can have some undesirable effects.
If you live in an area that actually experiences "Winter", you know that
the potholes in the streets get really bad in the Spring, because of the
constant expansion/contraction caused by freezing/thawing. Well you know
that when your computer is running it gets awfully warm in there! And
when it's not running, it cools to room temperature. All that changing
<page down> for more Power
of the temperature and expansion and contraction causes the boards and
cables inside the computer's case to work their way out of their slots
and plugs. So whenever you suspect that you have a bad video card or
drive controller, the first thing you want to check, before you spend
money on a repairman, is to open up the case and reseat all the cards and
replug all the cables. (Not if your computer is still under warranty, of
course, since opening it up would probably void the warranty!)
First you want to turn off the |npower|n to the computer, and unplug it from
the wall. Now open up the case, and before you touch anything inside,
plug the |npower|n cord back in so that the computer will be grounded. Now
touch the |npower|n supply (the big silver metal box usually in the right
rear corner) which, since the computer is plugged in, will drain off any
static charge that your body might be carrying. Because static electric-
ity can ruin a RAM chip just like that! (Static can do a lot of damage
to lots of parts of your computer, and your floppy disks too.) Touch the
|npower|n supply very frequently while you're working, especially if you're
standing on carpet! Just push down on all your expansion cards, and un-
plug and replug all the cables. Stay away from the motherboard, which is
<page down> for more Power
a big flat thing laying down in the bottom of the computer. Put the cov-
er back on and |npower|n up the computer, and it's very likely that your
hardware problem has vanished!
What about lightning? You want to talk about some power? There's more
electricity in a bolt of lightning than you will see anywhere else, all
week put together! If lightning strikes your neighborhood and your com-
puter is plugged into the wall via either the |npower|n cord, or the phone
cord leading to your modem, there's a good chance that your whole compu-
ter will be fried! If lightning strikes the house next door, your com-
puter is a goner for sure. If you hear thunder in the distance, finish
up what you're doing, shut the computer off, and unplug the |npower|n cord
and the modem's phone line just as quick as you can. If you live in an
area where there are a lot of thunderstorms in the summer, unplug the
|npower|n cord and the modem line every night when you go to bed, and every
time you leave the house. If you go on vacation, unplug even if your
area doesn't get that many thunderstorms! Turning the computer off does
not protect it from lightning in the least. If it's plugged in, light-
ning can kill it.
<page down> for more Power
Lightning and |npower|n Surges are just about the only reasons I can think of
for turning the computer off whenever you're not using it. I leave mine
on from the time I get up, until the time I go to bed, except for when I
leave the house. There are corporations that have a couple hundred com-
puters and they stay on twenty-four hours a day seven days a week, except
maybe Christmas vacation, and those computers do just fine. Some people
turn their computers off and on several times a day, and they seem to do
just fine too. I've got a feeling the reasons for turning it off are
just about equal to the reasons for leaving it on, and that it's just a
matter of personal preference. Read everything in this section, get a
few more opinions, and then use your best judgement as to how you want to
do it. It probably doesn't make much of a difference.
Oh, yeah, I thought of another reason in favor of turning it off. The
whole time the computer is running, the fan is pulling air from your room
into the computer and across the components to keep things cool in there.
Well, if your air has cigarette smoke or cat hair or dust floating around
in it, and you leave the computer on all the time, then those foreign
bodies in your air are going into the computer even more often than is
<page down> for more Power
necessary. Then again, I've got a very furry cat and I smoke two packs a
day, and I've never had any troubles with my computers.
Regardless of whether you decide to turn yours off or leave it on when
you're going to be away for a long time, you have to do something about
the monitor. As long as the same image sits unchanging on the screen,
you're risking what they call "burn-in". (Burning in has another defin-
ition too, and that is leaving the computer turned on for at least two
solid days when it's first been put together, because generally computer
components are most likely to fail very early in their life. If the com-
puter is left running and working on something like a battery of diagnos-
tic tests, for two whole days and nothing fails, that probably means the
computer is going to be fine for a long time to come. Your dealer should
have done this for you before he let you have the machine.) In this case
"burn-in" means that the same image being left on the screen for an ex-
tended period of time can cause that image to burn permanently into the
screen. You don't want this to happen, so whenever you walk away from
the computer for a minute, turn the brightness and contrast knobs all the
way down. If they're in the back and really hard to reach, then switch
<page down> for more Power
off the |npower|n on the monitor. It's not really good for the monitor to be
turning it on and off all the time, but it's better than burn-in. There
is a much better solution to this, though. There's a type of TSR called
a screen-blanker or screen-saver, which monitors your keyboard and every
time you don't hit any keys for a specified number of minutes, the TSR
will just remove everything from the screen or, in some cases, put up a
pretty pattern of constantly-changing graphics, and then when you want
your old screen back, you just hit any key and poof! The screen you were
working on before the screen-saver kicked in, is right there. There are
hundreds of shareware screen-savers available from your local BBS.
One of my favorite investments I ever made was an UPS. That stands for
Uninterriptible |nPower|n Supply and it's kind of a big battery with special
circuitry which makes it respond to a |npower|n outage in no time flat. If
your electricity so much as hiccups, the UPS will transfer your compu-
ter's |npower|n from the wall outlet to the battery so fast that your com-
puter won't even notice it. You won't lose a single byte of what's in
memory. It's just amazing. And when the electricity comes back on, the
UPS transfers right back to the |npower|n that's coming from the wall. Or if
<page down> for more Power
your electricity stays off, the UPS's battery will keep your computer
running for ten or fifteen minutes, plenty of time for you to save your
work to disk and shut the computer off. The electricity in my neighbor-
hood goes off just for a second at a time, about a dozen times a week.
Oh, how I used to hate that! But now that I bought my UPS, what the
electric company does, doesn't affect me in the least. My lights flicker
and my clocks all flash 12:00, 12:00, but my computer just keeps right on
going! Also, most UPSs also have some of the best possible Surge protec-
tion, and a line conditioner, and everything, so that the electricity
that goes through it and into the computer is always at exactly the right
voltage and everything. Fantastic! And an UPS is not nearly as expen-
sive as it used to be. Mine was under $200, and it's strong enough for a
good solid 386 computer. I hope you can get one for yourself soon too.
<page down> for Methods of Software Distribution
Methods of Software Distribution
The normal method for distribution of software is plain old |tcommercial|t
software that you buy in a store or from a catalog, and it generally
costs five or fifty times what it's worth.
Sometimes you can get a |tdemo|t version of a |ncommercial|n program, which you
can try out for free, but some of its best features will be disabled, so
that it won't do you much good except for seeing whether you like the
program or not. That way, if you like it, you'll buy a real copy.
|tShareware|t is a method of distribution where you can also try the program
out for free, and only buy it if you like it, but in most cases it is not
crippled the way |ncommercial|n demos are. There are some exceptions to that
and we generally refer to such programs as "crippleware", but for the
most part, |nshareware|n is fully functional.
The quality of a piece of |nshareware|n depends on the attitude of the au-
thor. Some authors realize that the only way they're going to get paid
<page down> for more Shareware
for the program, is if it's really good, and so they put a lot of work
into releasing an excellent product. Commercial software authors don't
always do that, because they get their money before you get the software
home and find out you don't like it! Unlike most any other type of prod-
uct in the world there is rarely a money-back guarantee for any software.
This is because once the package is opened, it is possible that whoever
opened it has made a copy of the disks to keep, or perhaps infected them
with a virus, so most stores won't accept any opened software for return.
So the author knows that once you buy the product, he gets his money re-
gardless of whether you like the program or not! Why should he waste a
bunch of time making a good program?
|nShareware|n authors know better, because the only way they can possibly get
any money at all is if you like the program well enough to send some mon-
ey. So they put a lot of time into getting it right. Also, commercial
software programmers have time limits placed on them by the marketing de-
partment of their company. |nShareware|n authors don't have to release their
products until they're ready for market. Just a couple explanations for
the fact that there are so many |nshareware|n products available that are
<page down> for more Shareware
even better than equivalent commercial programs!
Some |nshareware|n authors, though, realize that very few people ever bother
to register their |nshareware|n, so they don't try that hard, because they
figure they're not going to make any money on it anyway. Those authors
give |nshareware|n a bad name, but then again, that's only because so many
|nshareware|n users don't pay for their shareware! So in a way, if you don't
register the |nshareware|n you like, and you get some other |nshareware|n that
isn't any good, that's just as much your fault as the fault of the author
who didn't try hard because he knew you wouldn't register it anyway.
If you like the concept of downloading software from a BBS, trying it out
for a day or a week or a month, to make sure you like it, and then send-
ing a reasonable amount of money to the program's author, then please do
support the |nshareware|n industry by sending in a registration fee for what-
ever programs you like. Because if |nshareware|n authors don't make any mon-
ey, they're going to stop releasing their work in the |nshareware|n form, and
it will no longer be possible for you, or for anyone to benefit from such
an equitable arrangement as what |nshareware|n is.
<page down> for more Shareware
Besides, if you use a piece of |nshareware|n for more than a month or so,
without paying for it, you're basically breaking the law! You're never
going to get caught or go to jail for it, but that still doesn't make it
right.
Another reason to register your |nshareware|n, is that if you do, you might
get free upgrades, free technical support, a nice neat typeset manual, or
some special features like a new copy of the program that allows you to
change its screen colors. Or a new copy that doesn't have the obnoxious
"pause" screen that so many |nshareware|n programs use to remind you that you
haven't registered yet.
There are also other software authors who are just so generous, and have
written some program that they think is so necessary that everyone should
be able to have it, that they release the program as |tfreeware|t. This type
of software is just like it sounds, free! Totally and completely!
Another type of free software is |tpublic domain|t. This is just like free-
ware, only the author doesn't even care if anyone knows he wrote it.
<page down> for more Shareware
This stuff is not even copyrighted! A body could even use it as part of
a program that they're writing, without worrying that they'll get sued or
anything.
So, what types of |nshareware|n, freeware, and public domain software are
available? Just about every type that is available through conventional
commercial outlets, and more! Because commercial distributors are only
interested in software that would appeal to large numbers of people. So
there are fewer types. But if some programmer somewhere writes a little
program for his own use, and then decides he may as well try to get a
little money out of it, he releases it as |nshareware|n. Even if it is some-
thing that so few people would be interested in, that no software house
would take it, it is still available as |nshareware|n. I don't think there's
any function possible on a computer, that some |nshareware|n author somewhere
hasn't written a program to accomplish!
Ok, so how do you get this stuff? Well, there are a lot of mail order
companies that advertise in the computer magazines, that distribute
|nshareware|n. However, they charge anything from $1 to $5 per disk, for
<page down> for more Shareware
the copying and shipping fees. So that is in addition to the registra-
tion fee that is due the author if you like the program. The other main
way to get this sort of software, is by |ndownloading|n it over your modem,
from national online services or from local BBSs.
So, what is |tdownloading|t? Well that's when you use your modem to dial up
a local |nBBS|n, or one of the national online services, and you have your
software tell their software to send you a file. Then the file is sent
from their hard drive straight to your hard drive, over the phone line.
All, right, now what is a |TBBS|T? Well that stands for Bulletin Board Sys-
tem. What it means is that someone has a very expensive hobby! The
Sysop (System Operator) of a |nBBS|n has a spare computer with a large hard
drive, and a separate phone line, and some special |nBBS|n software, and you
can just use your modem to call up his computer, and play some games, or
write messages to other users, or download software!
One thing that most people have to find out the hard way, that is, by
having someone publicly ask them on the |nBBS|n to stop it, which is kind
<page down> for more Shareware
of embarrassing: It is considered rude to type in ALL CAPS on a BBS
because it's kind of hard to read, and it's interpreted as shouting.
Please turn off your <CapsLock> key when writing messages on any BBS.
Now usually a program that you download is all packed together into one
file with an extension like .ZIP, .ARC, .LZH, .ARJ, .ZOO, or .PAK. These
are called archive files or compressed files. They've been compressed so
that the compressed file is smaller than the sum of the files before com-
pression, so that it won't take so long to download it, and so that it
won't take up so much space on the hard drive of the BBS, and also so
that you can get the whole program by downloading just one file, rather
than downloading each file of the program separately.
So what do you do with a .ZIPped or .ARCed file when you get it? Well
you need the compression program it was compressed with, to decompress
it. There's a different compression program that works on each of those
archive extensions. One of the most popular is PKZIP which makes the
files with .ZIP extensions. All these compression programs are share-
ware and they are available on the same BBS you downloaded the file from.
<page down> for more Shareware
You just need to download the file that contains the compression program.
Now this file will have an .EXE extension, and it is called a Self-Ex-
tracting compressed file. What that means, is that if you just type its
name, like any other .EXE file, it will uncompress itself. That way you
don't have to have the PKUNZIP.EXE file already, in order to unzip the
PKZIP program. That wouldn't work at all, would it?
So when you execute the self-extracting file, it will unzip itself into
all of the files that make up the program. Like PKZIP.EXE, PKUNZIP.EXE,
PKZIPFIX.EXE (in the case of the PKZIP program), and MANUAL.DOC which
contains all the instructions on how to use the program. Now you can
unzip any .ZIP file you might want to download.
The next program you need to download after you get your decompression
programs, is a virus detection utility. A really popular one is John
McAfee's ViruScan. First use it to scan your hard drive, and also every
floppy disk you have, and then from then on, just scan everything you
download, and everything you buy, before you use it. And always keep the
most recent version of ViruScan, because the program won't find any vi-
<page down> for more Shareware
ruses that weren't invented yet by the time it was written. If you have
an old version of ViruScan, it will protect you from old viruses, but not
from new ones! Just like a vaccination.
So that's all there is, to get tons of software at minimal cost. Just
download, decompress, scan for viruses, and take it for a test drive.
But if it's |nshareware|n, and you like it, and you intend to use it, please
send in the registration fee! The only thing that keeps |nshareware|n auth-
ors writing more programs, is if they made some money on the last one
they wrote.
Well what do you do with the .ZIP or .ARC or whatever file that you down-
loaded, after you've opened it up and gotten all of the files out of it?
Well you erase it from your hard drive, because it takes up a lot of hard
disk space for nothing. But wait! First, make sure to copy it to a disk
for safe-keeping. Not only because maybe you deleted the program's docu-
mentation file, and you might need it again later. Well if so, you just
get it back out of the compressed file which you copied to a floppy disk.
But the most important reason to save the compressed file on a floppy, is
<page down> for more Shareware
that eventually you'll need to upload the file to somewhere. You see, a
lot of |sBBS|ss keep an upload/download ratio. That means you're only allow-
ed to download a certain number of files from each BBS, before you have
to upload a file to them in exchange for what you got from them. Well if
you kept the files you downloaded from another BBS, you can upload them
to this BBS where your up/down ratio is no good. So if you kept the com-
pressed files on a floppy disk, then you've got them handy, ready to up-
load whenever you need to.
You must not ever just zip up a bunch of files from your hard drive and
upload that. Because it is a copyright violation, to distribute part of
a program without every single bit of it just the way its author wanted
it distributed. And the only way to make sure you send all of the files
in their original form, is if you still have the .ZIP or .ARC or whatever
file in the form you downloaded it in. Because maybe there was a little
README.TXT file or a batch file that you knew you wouldn't need, and you
deleted it to save space. Or maybe the program has a little utility that
allows you to customize the program to your own favorite colors or some-
thing, and you did that. So if you were to compress the program back in-
<page down> for more Shareware
to a .ZIP or .ARC or whatever file, and upload it, that would be illegal
because it's not in the original form anymore. Well all you have to do,
to avoid such problems, is copy every file you download, to floppy disks
before you delete them from your hard drive. It's not so bad; I have all
the good files I've ever downloaded, sitting on just twelve 720K disks.
Another thing that is a copyright violation, is to use one paid-for copy
of a software program, on more than one computer. Some authors allow it,
but most don't. If you want to use a program on two computers, you usu-
ally have to pay for two copies. This is even true of DOS itself.
<page down> for What Are Wildcards?
What Are |tWildcards|t?
|nWildcards|n are a way to specify a group of files all in one word, so that
you can perform some DOS operation on them all by using just one command.
For example, you can't specify multiple files as parameters to the DEL
command, but what if you want to delete all the files in a |sdirectory|s? Do
you have to delete every single filename separately?
No, you can use |nwildcards|n. You know what |nwildcards|n do in poker, right?
If the dealer says at the beginning of a hand that the J is going to be
a wildcard, and you end up with the hand 10 J Q J A, then you can
say that your J is posing as a K, and you have a royal straight flush!
Well |nwildcards|n in DOS work in a similar manner.
The two |nwildcards|n that can be used are ? and *. The ? stands for "any
character in this position" and the * stands for "any character from this
position through the end of the filename" if the * is in the filename,
or "any character from this position through the end of the extension" if
the * is in the extension.
<page down> for more Wildcards
The wildcard specification |t*.*|t means every file with any number of char-
acters in the filename and any number (including zero) of characters in
the extension (up to the normal limit), in the current directory. (See
the RENAME chapter for some important information about how |nwildcards|n are
used on the target half of a command!) *.EXE would mean every file that
has the .EXE extension. BL*.? means all files whose first name starts
with BL and whose extension is only zero or one character long. BL??.E*
means all files whose first name starts with BL and only have zero, one,
or two characters after that, and whose extension is E or starts with E.
The reason that ? and * can represent zero characters, is that in a dir-
ectory, the bytes of data are always located in the same place. I mean,
the filename always starts in column one, the extension in column nine,
followed by the attributes byte in column twelve, etc. So if a filename
is only five characters long, then columns six through eight are padded
with spaces. Well as far as |nwildcards|n are concerned, a <Space> is sort
of a valid filename character, even though in other cases, DOS does not
allow them at all.
<page down> for more Wildcards
That's why if you ever accidentally give a file a name that has a <Space>
in it, and DOS won't let you do anything with it, you can use a wildcard
specification to rename the file to some legal filename. For example, if
the file was named ABC DEF.TXT, then you could do this:
RENAME ABC?DEF.TXT ABC-DEF.TXT
because the ? will pick up the <Space> in the filename, and a hyphen (-)
is a valid filename character. Now DOS will let you access that file.
Anyway, one thing you have to remember is that you don't have any control
over how many characters the * wildcard will stand for. If you want to
refer to two files named ABCDE.TXT and ABCE.TXT, you know that AB?E.TXT
won't work because in that first file, there are two characters between
the B and the E, so you might try AB*E.TXT. Well that wildcard spec will
pick up both of those files, but it will also pickup any other files that
start with AB and have the .TXT extension, regardless of whether the last
letter in the filename is an E or not, because * means "any characters
from here to the end of the filename", not just "one or two characters".
DOS will just totally ignore the E in that wildcard filespec.
<page down> for more Wildcards
So, do you want to delete every file in the current |sdirectory|s? DEL *.*
will do it. Want to copy all the files in your word processing program
to a floppy in drive B:? If they all start with WP, COPY WP*.* B: will
do that. Most DOS commands can use wildcard specifications in place of
exact filenames. |nWildcards|n won't catch Hidden files, though. The wild-
card specification *.* will catch all files in the current directory ex-
cept those with H or S attributes. (Except in DOS version 5.0, where the
ATTRIB command can match Hidden files with a wildcard specification.)
One thing that's really important when using |nwildcards|n, especially with
the DEL or ERASE commands: always do a DIR of it first! If you're about
to use DEL ABC*.?? to delete everything that has a filename that starts
with ABC and an extension of two or fewer characters, then first do DIR
ABC*.?? to make sure you aren't about to delete something you hadn't in-
tended to delete. Then if the DIR command doesn't show you any surpris-
es, just type |nDEL|n and <F3> and <Enter>. (See editing keys.) Because the
|nDEL|n will overwrite the |nDIR|n in the template, and then the <F3> key'll copy
the ABC*.?? from the template to the |ncurrent|n command line. So you know
exactly which files you're about to delete without retyping the wildcard.
<page down> for How Do You |nWrite-protect|n a Floppy?
How Do You |tWrite-protect|t a |sFloppy|s?
That's easy! On a 5.25-inch disk, there is a little notch near the upper
right corner, and if you cover that notch up with something that infrared
light can't pass through, the disk is write-protected.
On a 3.5-inch disk, there is a little hole in the upper right corner that
has a little slidey-gadget in it. If the hole is closed by the slidey-
gadget, the disk is not write-protected. If you slide the slidey-gadget
up so that light can go through the hole, then it is write-protected.
Notice that the situation is reversed between 5.25-inch and 3.5-inch
disks. On the 5.25, if light can go through, it's not write-protected,
but on the 3.5, if light can go through, it is write-protected. Goofy.
On a 3.5-inch High Density disk, you'll see that there is also another
hole, in the upper left corner, that doesn't have a slidey-gadget. That
one has nothing to do with write-protection. It is only there to tell
the drive that it's a HD disk instead of a Double Density disk.
<page down> for more Write-protect
Now what does write-protecting a disk do? Well it protects the disk from
having DOS write any information to it. DOS can't delete or change any
file on a disk while it is write-protected, because the disk drive has
some sensor in it, that detects whether light will go through that spot
on the disk's cover or not, and if the disk is write-protected, the drive
won't let any write-|ncurrent|n through the read/write heads.
However, if there is a power surge that causes some high voltage to "ac-
cidentally" travel through the drive's heads, I don't think that write-
protection will protect the spot on the disk that the heads happen to be
sitting above. But anything that deliberately tries to write to a disk
will be stopped by the write-protection.
Some disk drives have a little mechanical "pin" that checks for the hole,
rather than a beam of infrared light. And maybe some drives have regular
light instead of infrared. But as long as the notch on a 5.25" disk is
covered with some material that neither pin nor infrared light can get
through, the disk is write-protected. And remember that 3.5" disks are
backwards from 5.25" ones--if light goes through, it's write-protected.
<page down> for What Is ASCII?
What Is |tASCII|t?
|nASCII|n stands for American Standard Code for Information Interchange. It
is pronounced "ASK-ee". It's like a common language by which different
programs can communicate.
Say you have some data in a database, that you want to use in your spread
sheet. Well databases and spreadsheets generally speak two different
languages. But they both have one language in common. You can export
the database data into an |nASCII|n file, and import that |nASCII|n file into
your spreadsheet, and then your spreadsheet will be able to use the data-
base data!
An |nASCII|n file is just a text file that a human being could read, as op-
posed to one of those files that just looks like total gibberish if you
look at it with the TYPE command, like .EXE and .COM files do.
An |nASCII|n file is the only type of file that DOS can read, when it comes
to batch files and things like that. To make an |nASCII|n file, you can use
<page down> for more ASCII
any text editor, or your word processor also, if you can find the command
that your word processor uses to export an |nASCII|n file. Some word proces-
sors make it easy by calling it "export", or "ASCII", or "text", but
other word processors have to be difficult and call it something incom-
prehensible like "non-document mode" or "unformatted files".
Well, now I suppose you want to see this set of codes that's known as
|nASCII|n, right? Ok, get ready, here are the decimal |nASCII|n codes.
Non-printing characters: 9 ^I HT <Tab> 19 ^S DC3
0 ^@ NUL null 10 ^J LF linefeed 20 ^T DC4
1 ^A SOH 11 ^K VT 21 ^U NAK
2 ^B STX 12 ^L FF formfeed 22 ^V SYN
3 ^C ETX 13 ^M CR <Enter> 23 ^W ETB
4 ^D EOT 14 ^N SO 24 ^X CAN cancel
5 ^E ENQ 15 ^O SI 25 ^Y EM
6 ^F ACK 16 ^P DLE 26 ^Z EOF End-of-File
7 ^G BEL bell 17 ^Q DC1 27 ^[ ESC ESCape
8 ^H BS <Backspace> 18 ^R DC2 28 ^\ FS
<page down> for more ASCII
29 ^` GS 30 ^= RS 31 ^- US
Printing characters (|sdecimal|s and hexadecimal values):
32 20 <Space> 49 31 1 66 42 B 83 53 S 100 64 d 117 75 u
33 21 ! 50 32 2 67 43 C 84 54 T 101 65 e 118 76 v
34 22 " 51 33 3 68 44 D 85 55 U 102 66 f 119 77 w
35 23 # 52 34 4 69 45 E 86 56 V 103 67 g 120 78 x
36 24 $ 53 35 5 70 46 F 87 57 W 104 68 h 121 79 y
37 25 % 54 36 6 71 47 G 88 58 X 105 69 i 122 7A z
38 26 & 55 37 7 72 48 H 89 59 Y 106 6A j 123 7B {
39 27 ' 56 38 8 73 49 I 90 5A Z 107 6B k 124 7C ||
40 28 ( 57 39 9 74 4A J 91 5B [ 108 6C l 125 7D }
41 29 ) 58 3A : 75 4B K 92 5C \ 109 6D m 126 7E ~
42 2A * 59 3B ; 76 4C L 93 5D ] 110 6E n 127 7F <Del>
43 2B + 60 3C < 77 4D M 94 5E ^ 111 6F o
44 2C , 61 3D = 78 4E N 95 5F _ 112 70 p
45 2D - 62 3E > 79 4F O 96 60 ` 113 71 q
46 2E . 63 3F ? 80 50 P 97 61 a 114 72 r
47 2F / 64 40 @ 81 51 Q 98 62 b 115 73 s
48 30 0 65 41 A 82 52 R 99 63 c 116 74 t
<page down> for more ASCII
High-bit characters (also called IBM |nASCII|n extended characters):
128 Ç 147 ô 165 Ñ 183 ╖ 201 ╔ 219 █ 237 φ
129 ü 148 ö 166 ª 184 ╕ 202 ╩ 220 ▄ 238 ε
130 é 149 ò 167 º 185 ╣ 203 ╦ 221 ▌ 239 ∩
131 â 150 û 168 ¿ 186 ║ 204 ╠ 222 ▐ 240 ≡
132 ä 151 ù 169 ⌐ 187 ╗ 205 ═ 223 ▀ 241 ±
133 à 152 ÿ 170 ¬ 188 ╝ 206 ╬ 224 α 242 ≥
134 å 153 Ö 171 ½ 189 ╜ 207 ╧ 225 ß 243 ≤
135 ç 154 Ü 172 ¼ 190 ╛ 208 ╨ 226 Γ 244 ⌠
136 ê 155 ¢ 173 ¡ 191 ┐ 209 ╤ 227 π 245 ⌡
137 ë 156 £ 174 « 192 └ 210 ╥ 228 Σ 246 ÷
138 è 157 ¥ 175 » 193 ┴ 211 ╙ 229 σ 247 ≈
139 ï 158 ₧ 176 ░ 194 ┬ 212 ╘ 230 µ 248 °
140 î 159 ƒ 177 ▒ 195 ├ 213 ╒ 231 τ 249 ∙
141 ì 160 á 178 ▓ 196 ─ 214 ╓ 232 Φ 250 ·
142 Ä 161 í 179 │ 197 ┼ 215 ╫ 233 Θ 251 √
143 Å 162 ó 180 ┤ 198 ╞ 216 ╪ 234 Ω 252 ⁿ
144 É 163 ú 181 ╡ 199 ╟ 217 ┘ 235 δ 253 ²
145 æ 164 ñ 182 ╢ 200 ╚ 218 ┌ 236 ∞ 254 ■
146 Æ <page down> for more ASCII 255 blank
Extended characters: (These don't count for a text file but you may need
them for ANSI.SYS keyboard reassignment, and such things.) It takes two
codes put together to represent the following characters. The first code
is always the |nASCII|n null, which is 0, and the two codes are separated by
a semicolon (;). So to represent the <F10> key, whose keyboard scan code
is 68, you would type 0;68
1 Alt-ESC 25 Alt-P 39 Alt-; 56 Alt-Break
3 Null 26 Alt-[ 43 Alt-\ 57 Alt-Space
14 Alt-Backspace 27 Alt-] 44 Alt-Z 58 Capslock
15 Shift-Tab 28 Alt-Enter 45 Alt-X 59 F1
16 Alt-Q 30 Alt-A 46 Alt-C 60 F2
17 Alt-W 31 Alt-S 47 Alt-V 61 F3
18 Alt-E 32 Alt-D 48 Alt-B 62 F4
19 Alt-R 33 Alt-F 49 Alt-N 63 F5
20 Alt-T 34 Alt-G 50 Alt-M 64 F6
21 Alt-Y 35 Alt-H 51 Alt-, 65 F7
22 Alt-U 36 Alt-J 52 Alt-. 66 F8
23 Alt-I 37 Alt-K 53 Alt-/ 67 F9
24 Alt-O 38 Alt-L 55 Alt-* (keypad) 68 F10
<page down> for more ASCII
69 Numlock 88 Shift-F5 107 Alt-F4 126 Alt-7
70 Scroll Lock 89 Shift-F6 108 Alt-F5 127 Alt-8
71 Home 90 Shift-F7 109 Alt-F6 128 Alt-9
72 Up 91 Shift-F8 110 Alt-F7 129 Alt-0
73 Pg Up 92 Shift-F9 111 Alt-F8 130 Alt--
74 Alt-- (keypad) 93 Shift-F10 112 Alt-F9 131 Alt-=
75 Left 94 ^F1 113 Alt-F10 132 ^Pg Up
76 Shift-5 (keypad) 95 ^F2 114 ^Prt Sc 133 F11
77 Right 96 ^F3 115 ^Left 134 F12
78 Alt-+ (keypad) 97 ^F4 116 ^Right 135 Shift-F11
79 End 98 ^F5 117 ^End 136 Shift-F12
80 Down 99 ^F6 118 ^Pg Dn 137 ^F11
81 Pg Dn 100 ^F7 119 ^Home 138 ^F12
82 Insert 101 ^F8 120 Alt-1 139 Alt-F11
83 Delete 102 ^F9 121 Alt-2 140 Alt-F12
84 Shift-F1 103 ^F10 122 Alt-3 141 ^Up/8 (keypad)
85 Shift-F2 104 Alt-F1 123 Alt-4 142 ^- (keypad)
86 Shift-F3 105 Alt-F2 124 Alt-5 143 ^5 (keypad)
87 Shift-F4 106 Alt-F3 125 Alt-6 144 ^+ (keypad)
<page down> for more ASCII
145 ^Down/2 (keypad) 157 Alt-Right
146 ^Insert/0 (keypad) 159 Alt-End
147 ^Delete/. (keypad) 160 Alt-Down
148 ^Tab 161 Alt-Pg Dn
149 ^/ (keypad) 162 Alt-Insert
150 ^* (keypad) 163 Alt-Delete
151 Alt-Home 164 Alt-/ (keypad)
152 Alt-Up 165 Alt-Tab
153 Alt-Pg Up 166 Alt-Enter (keypad)
155 Alt-Left
Remember that a symbol such as ^Home means <Ctrl-Home> which means for
you to hold down one of the <Ctrl> keys while you hit the <Home> key.
For beginning of File 7, see APPEND
|tAUTOEXEC.BAT|t|fSIMPLY1|f
|TFAT|T|fSIMPLY1|f
|tBatch|t|fSIMPLY2|f
|TECHO|T|fSIMPLY2|f
|TGOTO|T|fSIMPLY2|f
|tpiping|t|fSIMPLY2|f
|tRedirection|t|fSIMPLY2|f
|TSHIFT|T|fSIMPLY2|f
|TSORT|T|fSIMPLY2|f
|T286|T|fSIMPLY3|f
|T386|T|fSIMPLY3|f
|TBIOS|T|fSIMPLY3|f
|tBytes|t|fSIMPLY3|f
|TCMOS|T|fSIMPLY3|f
|tLOADHIGH|t|fSIMPLY3|f
|tMemory|t|fSIMPLY3|f
|tRAMdisk|t|fSIMPLY3|f
|TRAM|T|fSIMPLY3|f
|TRESTORE|T|fSIMPLY3|f
|TROM|T|fSIMPLY3|f
|tsetup|t|fSIMPLY3|f
|TSHARE|T|fSIMPLY3|f
|tTSR|t|fSIMPLY3|f
|TXT|T|fSIMPLY3|f
|tANSI.SYS|t|fSIMPLY4|f
|tbad sector|t|fSIMPLY4|f
|TBREAK|T|fSIMPLY4|f
|tCONFIG.SYS|t|fSIMPLY4|f
|tDevice Driver|t|fSIMPLY4|f
|TFDISK|T|fSIMPLY4|f
|tfloppy|t|fSIMPLY4|f
|TFORMAT|T|fSIMPLY4|f
|TGRAPHICS|T|fSIMPLY4|f
|tIBMBIO.COM|t|fSIMPLY4|f
|tIBMDOS.COM|t|fSIMPLY4|f
|tIO.SYS|t|fSIMPLY4|f
|TLABEL|T|fSIMPLY4|f
|tLogical Drives|t|fSIMPLY4|f
|tMSDOS.SYS|t|fSIMPLY4|f
|tpartition|t|fSIMPLY4|f
|tPATH|t|fSIMPLY4|f
|tPROMPT|t|fSIMPLY4|f
|TSHELL|T|fSIMPLY4|f
|tCOMMAND.COM|t|fSIMPLY5|f
|TCON|T|fSIMPLY5|f
|TCOPY|T|fSIMPLY5|f
|tcurrent|t|fSIMPLY5|f
|TDEL|T|fSIMPLY5|f
|tDirectory|t|fSIMPLY5|f
|TDIR|T|fSIMPLY5|f
|TERASE|T|fSIMPLY5|f
|texternal|t|fSIMPLY5|f
|TKEYB|T|fSIMPLY5|f
|TPRN|T|fSIMPLY5|f
|TRENAME|T|fSIMPLY5|f
|troot|t|fSIMPLY5|f
|tShelling Out|t|fSIMPLY5|f
|TTYPE|T|fSIMPLY5|f
|TAPPEND|T|fSIMPLY7|f
|TASSIGN|T|fSIMPLY7|f
|tAttributes|t|fSIMPLY7|f
|TATTRIB|T|fSIMPLY7|f
|TBACKUP|T|fSIMPLY7|f
|TCHKDSK|T|fSIMPLY7|f
|TDEBUG|T|fSIMPLY7|f
|tediting keys|t|fSIMPLY7|f
|TEDLIN|T|fSIMPLY7|f
|tHidden|t|fSIMPLY7|f